<style scoped lang="less">
@import './login.less';
</style>

<template>
  <section class="loginHtml html">
    <div class="logoBox middle">
      <img src="https://img.yzcdn.cn/public_files/2017/10/24/1791ba14088f9c2be8c610d0a6cc0f93.jpeg" alt="">
    </div>
    <div class="appName middle">趣游</div>
    <van-button plain hairline type="primary">细边框按钮</van-button>
    <van-button plain hairline type="danger">细边框按钮</van-button>
  </section>
</template>

<script>
import { login } from '_api/user'
import { mapActions } from 'vuex'

export default {
  name: 'login',
  data () {
    return {
      form: {
        captcha: 'qc6k',
        captchaCode: 1567580793000,
        password: '123456',
        username: 'admin'
      }
    }
  },
  methods: {
    ...mapActions([
      'demo'
    ]),
    handleSubmit () {
      let _this = this
      login(_this.form).then(res => {
        console.log(res)
      })
    }
  },
  created () {
    let _this = this
    _this.handleSubmit()
  }
}
</script>
